<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box1 {
      width: 40px;
      height: 40px;
      background-color: #ec0808;
      border-radius: 50%;
      animation: farm 1s infinite linear alternate;
      transform: scale(0.5);
    }
    @keyframes farm {
      form { transform: translateX(0); }
      to { transform: translateX(120px); }
    }
  </style>
</head>
<body>
  <div class="box1">

  </div>
</body>
</html>